import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'on',
  routes: [{
    path: '/',
    component: () =>
      import('@/components/Index'),
    children: [{
      path: '',
      name: 'Home',
      component: () =>
        import('@/components/Home'),
      meta: {
        title: '首页'
      }
    }, {
      path: '/Ecology',
      name: 'Ecology',
      component: () =>
        import('@/components/Ecology'),
      meta: {
        requiresAuth: true,
        title: '生态'
      }
    }, {
      path: '/Assets',
      name: 'Assets',
      component: () =>
        import('@/components/Assets'),
      meta: {
        requiresAuth: true,
        title: '资产'
      }
    }]
  }, {
    path: '/Login',
    name: 'Login',
    component: () =>
      import('@/components/Login'),
    meta: {
      title: '登录'
    }
  }, {
    path: '/Register',
    name: 'Register',
    component: () =>
      import('@/components/Register'),
    meta: {
      title: '注册'
    }
  }, {
    path: '/RegisterTrue',
    name: 'RegisterTrue',
    component: () =>
      import('@/components/RegisterTrue'),
    meta: {
      title: '分享注册'
    }
  }, {
    path: '/Qr',
    name: 'Qr',
    component: () =>
      import('@/components/Qr'),
    meta: {
      title: '扫一扫'
    }
  }, {
    path: '/FindPwd',
    name: 'FindPwd',
    component: () =>
      import('@/components/FindPwd'),
    meta: {
      title: '忘记密码'
    }
  }, {
    path: '/FindPwdAux',
    name: 'FindPwdAux',
    component: () =>
      import('@/components/FindPwdAux'),
    meta: {
      title: '忘记密码查询助记词'
    }
  }, {
    path: '/Safety',
    name: 'Safety',
    component: () =>
      import('@/components/Safety'),
    meta: {
      requiresAuth: true,
      title: '安全设置'
    }
  }, {
    path: '/UpdatePwd',
    name: 'UpdatePwd',
    component: () =>
      import('@/components/UpdatePwd'),
    meta: {
      requiresAuth: true,
      title: '修改登录密码'
    }
  }, {
    path: '/UpdatePayPwd',
    name: 'UpdatePayPwd',
    component: () =>
      import('@/components/UpdatePayPwd'),
    meta: {
      requiresAuth: true,
      title: '修改/设置交易密码'
    }
  }, {
    path: '/UpdateMb',
    name: 'UpdateMb',
    component: () =>
      import('@/components/UpdateMb'),
    meta: {
      requiresAuth: true,
      title: '忘记交易密码'
    }
  }, {
    path: '/Invite',
    name: 'Invite',
    component: () =>
      import('@/components/Invite'),
    meta: {
      requiresAuth: true,
      title: '我的邀请码'
    }
  }, {
    path: '/ToChange',
    name: 'ToChange',
    component: () =>
      import('@/components/ToChange'),
    meta: {
      requiresAuth: true,
      title: '收款'
    }
  }, {
    path: '/OutChange',
    name: 'OutChange',
    component: () =>
      import('@/components/OutChange'),
    meta: {
      requiresAuth: true,
      title: '提币'
    }
  }, {
    path: '/NewsList',
    name: 'NewsList',
    component: () =>
      import('@/components/NewsList'),
    meta: {
      title: '公告列表'
    }
  }, {
    path: '/My',
    name: 'My',
    component: () =>
      import('@/components/My'),
    meta: {
      requiresAuth: true,
      title: '我的'
    }
  }, {
    path: '/NewsDetails',
    name: 'NewsDetails',
    component: () =>
      import('@/components/NewsDetails'),
    meta: {
      title: '公告详情'
    }
  }, {
    path: '/MyTeam',
    name: 'MyTeam',
    component: () =>
      import('@/components/MyTeam'),
    meta: {
      requiresAuth: true,
      title: '我的团队'
    }
  }, {
    path: '/MyReward',
    name: 'MyReward',
    component: () =>
      import('@/components/MyReward'),
    meta: {
      requiresAuth: true,
      title: '我的奖励'
    }
  }, {
    path: '/Auxiliaries',
    name: 'Auxiliaries',
    component: () =>
      import('@/components/Auxiliaries'),
    meta: {
      requiresAuth: true,
      title: '助记词'
    }
  }, {
    path: '/SuperNodeDetails',
    name: 'SuperNodeDetails',
    component: () =>
      import('@/components/SuperNodeDetails'),
    meta: {
      requiresAuth: true,
      title: '考核记录'
    }
  }, {
    path: '/SuperNodeDetailsType',
    name: 'SuperNodeDetailsType',
    component: () =>
      import('@/components/SuperNodeDetailsType'),
    meta: {
      requiresAuth: true,
      title: '考核记录详情'
    }
  }, {
    path: '/DepositMmoney',
    name: 'DepositMmoney',
    component: () =>
      import('@/components/DepositMmoney'),
    meta: {
      requiresAuth: true,
      title: '存币理财'
    }
  }, {
    path: '/DepositDetails',
    name: 'DepositDetails',
    component: () =>
      import('@/components/DepositDetails'),
    meta: {
      requiresAuth: true,
      title: '理财详情'
    }
  }, {
    path: '/DepositBuy',
    name: 'DepositBuy',
    component: () =>
      import('@/components/DepositBuy'),
    meta: {
      requiresAuth: true,
      title: '购买'
    }
  }, {
    path: '/TransactionRules',
    name: 'TransactionRules',
    component: () =>
      import('@/components/TransactionRules'),
    meta: {
      requiresAuth: true,
      title: '交易规则'
    }
  }, {
    path: '/record',
    name: 'record',
    component: () =>
      import('@/components/record'),
    meta: {
      requiresAuth: true,
      title: '参与记录'
    }
  }, {
    path: '/records',
    name: 'records',
    component: () =>
      import('@/components/records'),
    meta: {
      requiresAuth: true,
      title: '参与记录详情'
    }
  }, {
    path: '/Lang',
    name: 'Lang',
    component: () =>
      import('@/components/Lang'),
    meta: {
      title: '多语言'
    }
  }, {
    path: '/Snatch',
    name: 'Snatch',
    component: () =>
      import('@/components/recreation/Snatch'),
    meta: {
      requiresAuth: true,
      title: '夺宝列表'
    }
  }, {
    path: '/Details',
    name: 'Details',
    component: () =>
      import('@/components/recreation/Details'),
    meta: {
      requiresAuth: true,
      title: '夺宝详情页'
    }
  }, {
    path: '/Prize',
    name: 'Prize',
    component: () =>
      import('@/components/recreation/Prize'),
    meta: {
      requiresAuth: true,
      title: '奖品列表'
    }
  }, {
    path: '/Order',
    name: 'Order',
    component: () =>
      import('@/components/recreation/Order'),
    meta: {
      requiresAuth: true,
      title: '订单页'
    }
  }, {
    path: '/Address',
    name: 'Address',
    component: () =>
      import('@/components/recreation/Address'),
    meta: {
      requiresAuth: true,
      title: '收货地址'
    }
  }, {
    path: '/AddAddress',
    name: 'AddAddress',
    component: () =>
      import('@/components/recreation/AddAddress'),
    meta: {
      requiresAuth: true,
      title: '添加收货地址'
    }
  }, {
    path: '/UpdateAddress',
    name: 'UpdateAddress',
    component: () =>
      import('@/components/recreation/UpdateAddress'),
    meta: {
      requiresAuth: true,
      title: '编辑收货地址'
    }
  }, {
    path: '/OrderPage',
    name: 'OrderPage',
    component: () =>
      import('@/components/recreation/OrderPage'),
    meta: {
      requiresAuth: true,
      title: '订单详情页'
    }
  }, {
    path: '/More',
    name: 'More',
    component: () =>
      import('@/components/recreation/More'),
    meta: {
      requiresAuth: true,
      title: '更多'
    }
  }, {
    path: '/Video',
    name: 'Video',
    component: () =>
      import('@/components/Video'),
    meta: {
      requiresAuth: true,
      title: '视频'
    }
  }, {
    path: '/PropertyCrowdfunding',
    name: 'PropertyCrowdfunding',
    component: () =>
      import('@/components/crowdfunding/PropertyCrowdfunding'),
    meta: {
      requiresAuth: true,
      title: '房产众筹'
    }
  }, {
    path: '/PropertyDetails',
    name: 'PropertyDetails',
    component: () =>
      import('@/components/crowdfunding/PropertyDetails'),
    meta: {
      requiresAuth: true,
      title: '房产详情'
    }
  }, {
    path: '/ParticipationInstructions',
    name: 'ParticipationInstructions',
    component: () =>
      import('@/components/crowdfunding/ParticipationInstructions'),
    meta: {
      requiresAuth: true,
      title: '参与说明'
    }
  }, {
    path: '/ProjectProgress',
    name: 'ProjectProgress',
    component: () =>
      import('@/components/crowdfunding/ProjectProgress'),
    meta: {
      requiresAuth: true,
      title: '项目进展'
    }
  }, {
    path: '/ForMy',
    name: 'ForMy',
    component: () =>
      import('@/components/crowdfunding/ForMy'),
    meta: {
      requiresAuth: true,
      title: '我的'
    }
  }, {
    path: '/MyProject',
    name: 'MyProject',
    component: () =>
      import('@/components/crowdfunding/MyProject'),
    meta: {
      requiresAuth: true,
      title: '我的项目'
    }
  }, {
    path: '/MyDividend',
    name: 'MyDividend',
    component: () =>
      import('@/components/crowdfunding/MyDividend'),
    meta: {
      requiresAuth: true,
      title: '我的分红'
    }
  }, {
    path: '/MySettlement',
    name: 'MySettlement',
    component: () =>
      import('@/components/crowdfunding/MySettlement'),
    meta: {
      requiresAuth: true,
      title: '我的结算'
    }
  },{
    path: '/MyDividendRecord',
    name: 'MyDividendRecord',
    component: () =>
      import('@/components/crowdfunding/MyDividendRecord'),
    meta: {
      requiresAuth: true,
      title: '我的分红记录'
    }
  }, {
    path: '/MySettlementRecord',
    name: 'MySettlementRecord',
    component: () =>
      import('@/components/crowdfunding/MySettlementRecord'),
    meta: {
      requiresAuth: true,
      title: '我的结算记录'
    }
  }, {
    path: '/MyProjectProgress',
    name: 'MyProjectProgress',
    component: () =>
      import('@/components/crowdfunding/MyProjectProgress'),
    meta: {
      requiresAuth: true,
      title: '我的项目进展'
    }
  }, {
    path: '/MoneyDetails',
    name: 'MoneyDetails',
    component: () =>
      import('@/components/crowdfunding/MoneyDetails'),
    meta: {
      requiresAuth: true,
      title: '我的项目金额详情'
    }
  }]
})
